package com.zs.games.enums;

public enum SourceTypeEnum {


    NEWS(1,"新闻"),
    DYNAMICS(2,"动态"),
    GAME(3,"游戏"),
    ;

    private int value;
    private String desc;

    SourceTypeEnum(int value,String desc) {
        this.value = value;
        this.desc = desc;
    }

    public  static SourceTypeEnum getSourceType(int value) {
        for (SourceTypeEnum sourceTypeEnum : SourceTypeEnum.values()) {
            if (sourceTypeEnum.getValue() == value) {
                return sourceTypeEnum;
            }
        }
        return null;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
